UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MttGd+pl8JkmBaI0RQutPIh53hGg1jf9eP2spgBZTxA='
WHERE
key_id = '5bfbee00b97ec37d9efb4865f2eda2a6bbfa29837d3a88eb4917685061c3d64a'
AND (
token = 'MttGd+pl8JkmBaI0RQutPIh53hGg1jf9eP2spgBZTxA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)