UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CEGbSKn/JHtrcbQorHSM6k9tnqA/ZmZQCW1d5XoPqXw='
WHERE
key_id = 'eefbd040fa217f7d42371c929e044e8629b5ca7db4587b5d6c269fe921fd2e91'
AND (
token = 'CEGbSKn/JHtrcbQorHSM6k9tnqA/ZmZQCW1d5XoPqXw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)