UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'A3Votb9uPqqMTFwlLBWJMZI4j6tViP37XTR/lJM0hUU=' 
WHERE 
  key_id = 'b81e1ae5348d608f4f61a15a894d953603cdacf70be18aeaf102ea7a2277bf5b' 
  AND (
    token = 'A3Votb9uPqqMTFwlLBWJMZI4j6tViP37XTR/lJM0hUU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025