UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yObwxgZjH/EvY/nWZq5aKdBHvtoTgx/YXedWaniin9c=' 
WHERE 
  key_id = '82c9b07d9ee889cb59290c7748cc959121693f26e880084c5b94744d2459d2d5' 
  AND (
    token = 'yObwxgZjH/EvY/nWZq5aKdBHvtoTgx/YXedWaniin9c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038