UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r80y8sHnhTfBL1JCccEMViccvMSIbuB8hphgpp/iLFA='
WHERE
key_id = '7748149f010e7990e5fe257dbd1d3bc7ec45534ce5084009a4d5aaa5078e71b8'
AND (
token = 'r80y8sHnhTfBL1JCccEMViccvMSIbuB8hphgpp/iLFA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)