UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '75CGLNepTrEyJ0n1rS+P6+t3hgTc8eoGj/aIP1X94YY='
WHERE
key_id = 'e0b0c30e434b93b57188e264a5e134da231fb9cee54da11b22609d5644b79d84'
AND (
token = '75CGLNepTrEyJ0n1rS+P6+t3hgTc8eoGj/aIP1X94YY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)