UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AutuEtJ6EMJyUvbnZVME/2XzTxUMDPTXeGgpAAQqLqs='
WHERE
key_id = '5269e0bf47a5004662a5564acad53d96df5ba6b9bf68b2e852b2acc5e68135f0'
AND (
token = 'AutuEtJ6EMJyUvbnZVME/2XzTxUMDPTXeGgpAAQqLqs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)