UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'P4O0ICggvXdS038QMaQ2m7Au2VvEUMyoIf7+BLTqx7U=' 
WHERE 
  key_id = '67db3f955d5a6dd30b02b9121f828ef5ba7211aa47a5a6ff4af77470a7dc2003' 
  AND (
    token = 'P4O0ICggvXdS038QMaQ2m7Au2VvEUMyoIf7+BLTqx7U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030