UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ReUGuE8D+2A0/je7Uz3LXZGn6zswevK35GQZyJ2PRzg=' 
WHERE 
  key_id = '4084e37ed651713343a9ff2d2f5b09438922b447e60eab556dfb226b5a3b75c2' 
  AND (
    token = 'ReUGuE8D+2A0/je7Uz3LXZGn6zswevK35GQZyJ2PRzg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055