UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LzZxG7w1wO2AvGm99tpMYbeel9qm7xDBSUkgunE+Yug=' 
WHERE 
  key_id = '98f9d0fabbab40b9688305c6cbfe233cd2009d35afdce838e184741fced3dac7' 
  AND (
    token = 'LzZxG7w1wO2AvGm99tpMYbeel9qm7xDBSUkgunE+Yug=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026