UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QMLAcUyWEHTWQwlfqtkJpHCEgBr/LQDSUNzXb6xFOPc='
WHERE
key_id = '518e8f0d3ff7ce47258c8a2aef6bf839a61c95edd455595e5fe85c2c527d1143'
AND (
token = 'QMLAcUyWEHTWQwlfqtkJpHCEgBr/LQDSUNzXb6xFOPc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)