UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PrLv+IjU4bDHQK4APWLOmb+eLUaoaKTApdf+tv31vnE=' 
WHERE 
  key_id = '548bb2b375c9bdbdbbd776ae42e207ca1d85a503ef9964e95199f58d7f7cf1cb' 
  AND (
    token = 'PrLv+IjU4bDHQK4APWLOmb+eLUaoaKTApdf+tv31vnE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024