UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'M4JWTtRKMclZkpZSTy4gOGuLy5rNhFJ3FCBo0u4E+TI=' 
WHERE 
  key_id = 'fac14adbf8b91aaa43299d18a6ad9999e587964697a0ca76041bb4a0aafc9e65' 
  AND (
    token = 'M4JWTtRKMclZkpZSTy4gOGuLy5rNhFJ3FCBo0u4E+TI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046