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

Query time 0.00020