UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dUwJkm+NnSM7IT+sFvFm/0M1gOLOF1jeuOhwo7panyQ=' 
WHERE 
  key_id = '5a302bad497461f2a81fd84b3fadac83e0051872117b490a14a35b7ac53a453c' 
  AND (
    token = 'dUwJkm+NnSM7IT+sFvFm/0M1gOLOF1jeuOhwo7panyQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028