UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xpkTE8fd2TSO/q9KAiRwDU0Xpaub66RHslcbloPVG/4='
WHERE
key_id = '3000cf5bec6fbb978d1d42597d0b64fc728e4069b5d8ae4172e63bc4894d9c21'
AND (
token = 'xpkTE8fd2TSO/q9KAiRwDU0Xpaub66RHslcbloPVG/4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)