UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VebciIsQNBKoQs5TMjFu5hYRPEJ5bpS55JWWKLb3fYk=' 
WHERE 
  key_id = 'a37c8bdf80e03a75375953f3a4f6b5dcb10bf2e30cd3e40ba96e90e07c204aef' 
  AND (
    token = 'VebciIsQNBKoQs5TMjFu5hYRPEJ5bpS55JWWKLb3fYk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027