UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '94nZp2dZiuO+o0pGPpEchvbS1LPNRB53trFEzqEJ31E='
WHERE
key_id = '02e33331fbf2b628702db4b90ad80a30a8085474f0911fab37e48c5d45201b29'
AND (
token = '94nZp2dZiuO+o0pGPpEchvbS1LPNRB53trFEzqEJ31E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)