UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rjk7IjldbMlaMteKBL3cAc/evovnQxlK+XsJAP6dosY=' 
WHERE 
  key_id = 'bd209a581c9888f30acf3caf55a089fa304e1beeea25189b2bc87cc36f2926c7' 
  AND (
    token = 'rjk7IjldbMlaMteKBL3cAc/evovnQxlK+XsJAP6dosY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014