UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e5MRtftIWaefiAKXZblumBLOGVUzBnmCltnPURGqLrI='
WHERE
key_id = '5cfd5fcdb4241003785fd226bec1541cebe05f1bb3ebacb1c60a989e68b87fa6'
AND (
token = 'e5MRtftIWaefiAKXZblumBLOGVUzBnmCltnPURGqLrI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)