UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4NxlDwRSDuZY/xtWjfMjAauuerLwn6oBxOyQmGlkX0A=' 
WHERE 
  key_id = '45b6f54abbc4bb8c532f1c5ecc97eb48f6a81eb261db3b16b605f3909380ac8f' 
  AND (
    token = '4NxlDwRSDuZY/xtWjfMjAauuerLwn6oBxOyQmGlkX0A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021