UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sC2OVeZvKc9zx7VEV26atZoI8Uwk//gXy2fdoRSBwfc=' 
WHERE 
  key_id = 'c89e97c9cd5ffbd84751bd9ee9d039d2184fb7bcd0a0f59a1b0f3a6eca8189ed' 
  AND (
    token = 'sC2OVeZvKc9zx7VEV26atZoI8Uwk//gXy2fdoRSBwfc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030