UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mX06jNOaGgvJnaOimZ0U1e68wPyw25r7vyfdvyysQrE='
WHERE
key_id = '63083692d0bd4a7df1936a3f7f4ee9e3c3debcb577447e0fcdbcd28b815d7fd4'
AND (
token = 'mX06jNOaGgvJnaOimZ0U1e68wPyw25r7vyfdvyysQrE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)