UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zMLElWf/AXcO0olkEoI7wVFWkd43NCEPO15rT0KoA+c='
WHERE
key_id = '88c12c5de3afe71dd6be94ea2fbc64ec43c661c0e64fe85057618da7993dca56'
AND (
token = 'zMLElWf/AXcO0olkEoI7wVFWkd43NCEPO15rT0KoA+c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)