UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xLw+dEo9WHXr7kKvAimE9MO27aZZvSnu4+aJqiIzB34=' 
WHERE 
  key_id = '38150f9f4d7d905e874dda43fb8297c1865571c54457e3234f92895ce930d7b3' 
  AND (
    token = 'xLw+dEo9WHXr7kKvAimE9MO27aZZvSnu4+aJqiIzB34=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042