UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q5w9+DSD9ByErU4gQ9Ggqmu9rhZdEHKlQsHlUnNT+2Q='
WHERE
key_id = '06932ae60b4f2508a18c6785cf8a71cdfa13a625859e8dc5f535ad7b4dfc1fca'
AND (
token = 'q5w9+DSD9ByErU4gQ9Ggqmu9rhZdEHKlQsHlUnNT+2Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)