UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yPyOj44eGL/J3RtMg23RtH2qaaSFmwI8JlK4xgFTVGs='
WHERE
key_id = 'e03ca57563a5f7d97bc89574c120dacadb5a650be9fb2f236bb10b5757c4b5b3'
AND (
token = 'yPyOj44eGL/J3RtMg23RtH2qaaSFmwI8JlK4xgFTVGs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)