UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oETgZAG45GIek7FQCxkWXZzn2fxARwkTuHy4ILQ/rPo=' 
WHERE 
  key_id = '68fda11ac0678b3f0aef1571330e97218c937a27146340c72e837fb7273a8f46' 
  AND (
    token = 'oETgZAG45GIek7FQCxkWXZzn2fxARwkTuHy4ILQ/rPo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031