UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Wn3WCaHv6na1Vrss5CQIY6KVoC46c0Ts/bvvd6ZMAA='
WHERE
key_id = '6bd80b4b6f3166d61f3434ee489e44171305591ae2668920e1dbf5849e8e2324'
AND (
token = '+Wn3WCaHv6na1Vrss5CQIY6KVoC46c0Ts/bvvd6ZMAA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)