UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8Laq+ryY0MpFRzoSyknvE1iXoRMY9QsR7lIuGgUCvtI='
WHERE
key_id = '656625141516d4bf99b34c6375f40a6237f7f9c5025d9cec8005725faff06e5f'
AND (
token = '8Laq+ryY0MpFRzoSyknvE1iXoRMY9QsR7lIuGgUCvtI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)