UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CMMNQMBqvYzch+3301pdV4duKToxAjgdcKaquzmYeSg=' 
WHERE 
  key_id = 'c03f7ca8ed1322796b0d2c0e949737b7bb46dc935a6323b8899b70607b230e0b' 
  AND (
    token = 'CMMNQMBqvYzch+3301pdV4duKToxAjgdcKaquzmYeSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034