UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jXzaFXY1DFCvHl3xLWL/f7ALc/oKj4J/WIlJ2j0lTsg=' 
WHERE 
  key_id = '3b25d21ae10a7ccaf39c1a94e3869e6668f36e0dfaf7fce08a870baab9a22cf3' 
  AND (
    token = 'jXzaFXY1DFCvHl3xLWL/f7ALc/oKj4J/WIlJ2j0lTsg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031