UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BWuzPUuldhYDNbhgUZv/08X8vOf2MLlvDmawksL5W0A='
WHERE
key_id = '809dfcb624fb1f1bd4791075c2492fecf0332fee6eac0607cbe9bf876f9d911f'
AND (
token = 'BWuzPUuldhYDNbhgUZv/08X8vOf2MLlvDmawksL5W0A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)