UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dobv5Wc8tFr09SNQoGfzWTHBO/m83dSRGHJxNRwsE2k='
WHERE
key_id = '32ce60bea3a7aeddb2fc79aac853a4e68ca7f344c10a411abad2f25f18ece465'
AND (
token = 'Dobv5Wc8tFr09SNQoGfzWTHBO/m83dSRGHJxNRwsE2k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)