UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mn0bnxsckx64zzo1tzbBEIdthHd3Y5zQfAF0g/eA3Vg='
WHERE
key_id = '136c3ab5595e45e976ff23bc0d3c2a72db6ec1cba3e39540d65118c39cca4e74'
AND (
token = 'mn0bnxsckx64zzo1tzbBEIdthHd3Y5zQfAF0g/eA3Vg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)