UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6HClZ6kX1TxoYb2obahQKnKJQ8SGbbqtXw9x1oTA7UU='
WHERE
key_id = '7aba4431fb3c45b4b081b2548383be8a86ef4f72bd711b1a079781834600aae9'
AND (
token = '6HClZ6kX1TxoYb2obahQKnKJQ8SGbbqtXw9x1oTA7UU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)