UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'srtNo3iY8y1jdGXpUlWnN0cSRSkPUKRFyXg98S9vUl0='
WHERE
key_id = '63b05f4286570dfba66299fba195afcfee0d9be58cb102cda9ad547557eca0d0'
AND (
token = 'srtNo3iY8y1jdGXpUlWnN0cSRSkPUKRFyXg98S9vUl0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)