UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0rH5snJFyHXBqV/UzffQxHw3KAXpNLinMjvOpHHb5ng='
WHERE
key_id = 'e218ad476224c6eb3739c377f95dd233b845a37d6c2b6c9408fe29bcfbc17320'
AND (
token = '0rH5snJFyHXBqV/UzffQxHw3KAXpNLinMjvOpHHb5ng='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)