UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EzccfX8JQQs25lz7/X1UHnQz0ykildby3ZMqvnSOWAY='
WHERE
key_id = 'a67582d1ebd1b533790b52d6c4999b13bb8b7dd224f39ee52b5e1ab0d1c577cf'
AND (
token = 'EzccfX8JQQs25lz7/X1UHnQz0ykildby3ZMqvnSOWAY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)