UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7XwUosNDJDFiftt9bBP5Jn48lmN5ZUvAwtQZc7yE/nY='
WHERE
key_id = '2879d429e299d4c3e18641e1fa9f1dd26d381a2247c6c9de86f02c9ef8ed9128'
AND (
token = '7XwUosNDJDFiftt9bBP5Jn48lmN5ZUvAwtQZc7yE/nY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)