UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vi5kh/Zqem77F7jPc/6PtrOwlJVY0gXOA9BrbOF5XUM='
WHERE
key_id = '7530ac2faf82b679466bdd5fc6773e0d6bbbe51ef7f47b4b6ddd2cf8181a3f70'
AND (
token = 'vi5kh/Zqem77F7jPc/6PtrOwlJVY0gXOA9BrbOF5XUM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)