UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/0TlAcvALrOVMDW9WTAJRf78LoysunhD+c3HXVjU/Jo=' 
WHERE 
  key_id = '82877dc7b0b58b76a01e842a086954db753b5b6a3b812bda86fc1a4a0a7ac58c' 
  AND (
    token = '/0TlAcvALrOVMDW9WTAJRf78LoysunhD+c3HXVjU/Jo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025