UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vp0M/Y+skT9LfOCSsYj4CuvBq6lBPq+p3WZSR+nntrE=' 
WHERE 
  key_id = 'cbc468ad5f4c492cff8c57fbb65ed06fee0c388c8cea303d6957a88c94a4a923' 
  AND (
    token = 'Vp0M/Y+skT9LfOCSsYj4CuvBq6lBPq+p3WZSR+nntrE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027