UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fB1jMPsbrH5Qz/JOk2lbqcWeQP8Dxyd4O4jBKU5qZpc='
WHERE
key_id = '75cbd95bb4456dfafd6429a9f466b747a507fcf0991a1f2f7f34ca1a46d8cf0e'
AND (
token = 'fB1jMPsbrH5Qz/JOk2lbqcWeQP8Dxyd4O4jBKU5qZpc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)